package com.objetdirect.gwt.umldrawer.shared.dto;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

@Entity
@Table(name = "developer")
public class DeveloperDto implements Serializable {

	private static final long serialVersionUID = 8102174917437508293L;

	@Id
	@Column(name = "developer_email", nullable = false, unique = true)
	String developerEmail;

	@Column(name = "developer_firstName", nullable = false)
	String firstName;

	@Column(name = "developer_lastName", nullable = false)
	String lastName;

	@Column(name = "developer_password", nullable = false)
	String password;

	@Column(name = "developer_online_status")
	int onlineStatus;

	@ManyToMany(mappedBy = "developers")
	private List<ProjectDto> projects;

	// @OneToOne (mappedBy = "developerEmail", targetEntity =
	// ProfilePictureDTO.class)
	// private ProfilePictureDTO profilePicture;
	//
	// @OneToMany (mappedBy = "recieverEmail", targetEntity = MessagesDTO.class)
	// private List<MessagesDTO> messages;

	public DeveloperDto() {
	}

	public DeveloperDto(String developerEmail) {
		super();
		this.developerEmail = developerEmail;
	}

	public DeveloperDto(String developerEmail, String firstName,
			String lastName, String password, int onlineStatus) {
		this.developerEmail = developerEmail;
		this.firstName = firstName;
		this.lastName = lastName;
		this.password = password;
		this.onlineStatus = onlineStatus;
	}

	public String getDeveloperEmail() {
		return developerEmail;
	}

	public void setDeveloperEmail(String developerEmail) {
		this.developerEmail = developerEmail;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getOnlineStatus() {
		return onlineStatus;
	}

	public void setOnlineStatus(int onlineStatus) {
		this.onlineStatus = onlineStatus;
	}

	public void setProjects(List<ProjectDto> projects) {
		this.projects = projects;
	}

	public List<ProjectDto> getProjects() {
		return projects;
	}

	// public void setProfilePicture(ProfilePictureDTO profilePicture) {
	// this.profilePicture = profilePicture;
	// }
	//
	// public ProfilePictureDTO getProfilePicture() {
	// return profilePicture;
	// }
	//
	// public void setMessages(List<MessagesDTO> messages) {
	// this.messages = messages;
	// }
	//
	// public List<MessagesDTO> getMessages() {
	// return messages;
	// }
}
